//
//  CNMyOrderTableViewCell.m
//  BeeQuick_19
//
//  Created by clinging on 16/9/27.
//  Copyright © 2016年 CN Team. All rights reserved.
//

#import "CNMyOrderTableViewCell.h"
@interface CNMyOrderTableViewCell ()
//时间
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;

//完成
@property (weak, nonatomic) IBOutlet UILabel *progressLabel;

//件数
@property (weak, nonatomic) IBOutlet UILabel *NumLabel;

// 实付的价格
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;

//一组图片
@property (strong, nonatomic) IBOutletCollection(UIImageView) NSArray *imgsImageViews;
@end

@implementation CNMyOrderTableViewCell

-(void)setOrderModel:(CNMyOrderModel *)orderModel
{
    _orderModel = orderModel;
    //  时间
    self.timeLabel.text = orderModel.completion_time;
    //完成
    self.progressLabel.text = orderModel.textStatus;
    //图片
    self.priceLabel.text = orderModel.real_amount;
    //判断图片是否超出要显示的数
    if (self.dataArr.count > 4)
    {
        [self.imgsImageViews[4] setImage:[UIImage imageNamed:@"v2_goodmore"]];
        for (NSInteger i = 0; i < 4; i++) {
            
            
            // 取出imgView对应的图片地址
            UIImageView *imgView = self.imgsImageViews[i];
            NSString *imgs = self.dataArr[i];
            [imgView sd_setImageWithURL:[NSURL URLWithString:imgs]];
            
        }
    }
    else{
        for (NSInteger i = 0; i < 4; i++) {
            
            
            // 取出imgView对应的图片地址
            UIImageView *imgView = self.imgsImageViews[i];
            NSString *imgs = self.dataArr[i];
            [imgView sd_setImageWithURL:[NSURL URLWithString:imgs]];
        }
        
        
    }
    
    
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
